<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html;" charset="<?php echo CHARSET;?>">
<title>本地生活</title>
<link href="/mxd_web/Public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile"/>
<script type="text/javascript" src="/mxd_web/Public/static/jquery.js"></script>
<script type="text/javascript" src="/mxd_web/Public/static/jquery.validation.min.js"></script>
<script type="text/javascript" src="/mxd_web/Public/admin/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/mxd_web/Public/admin/js/admincp.js"></script>
<script type="text/javascript" src="/mxd_web/Public/admin/js/jquery.tooltip.js"></script>
<script language="javascript">
var SiteUrl = '<?php echo (C("SiteUrl")); ?>';
var AdminUrl = SiteUrl+'/<?php echo (MODULE_NAME); ?>';
</script>
</head><body>

<div class="page">
  <table class="table tb-type2 order">
    <tbody>
      <tr class="space">
        <th colspan="15">订单状态</th>
      </tr>
      <tr>
        <td colspan="2"><ul>
            <li><strong>订单号:</strong><?php echo ($vo['order_sn']); ?></li>
            <li><strong>订单状态:</strong><?php echo (get_order_state_name($vo['order_state'])); ?></li>
            <li><strong>订单总额:</strong><span class="red_common"><?php echo ($vo['order_amount']); ?></span></li>
            <li><strong>运费:</strong><?php echo ($vo['shipping_fee']); ?></li>
          </ul></td>
      </tr>
      <tr class="space">
        <th colspan="2">订单详情</th>
      </tr>
      <tr>
        <th>收货人及发货信息</th>
      </tr>
      <tr>
        <td><ul>
            <li><strong>收货人姓名:</strong><?php echo ($addr['true_name']); ?></li>
            <li><strong>收货地址:</strong><?php echo ($addr['address']); ?></li>
            <li><strong>邮政编码:</strong><?php echo ($addr['zip_code']); ?></li>
            <li><strong>电话号码:</strong><?php echo ($addr['mob_phone']); ?></li>
            <li><strong>发货状态:</strong>
            	<?php if($vo['order_state'] == 30): ?>已发货
                <?php elseif($vo['order_state'] == 40): ?>已收货 
                <?php elseif($vo['order_state'] == 50): ?>已完成
                <?php else: ?>未知<?php endif; ?> 
            </li>
            <li><strong>配送方式:</strong><?php echo ($vo['shipping_name']); ?> <?php echo ($vo['shipping_code']); ?></li>
          </ul></td>
      </tr>
      <tr>
        <th>商品信息</th>
      </tr>
      <tr>
        <td><table class="table tb-type2 goods ">
            <tbody>
              <tr>
                <th></th>
                <th>商品信息</th>
                <th class="align-center">规格</th>
                <th class="align-center">单价</th>
                <th class="align-center">数量</th>
              </tr>
              <?php if(is_array($vo['OrderGoods'])): $i = 0; $__LIST__ = $vo['OrderGoods'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$gd): $mod = ($i % 2 );++$i;?><tr>
                <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><img src="/mxd_web/Uploads/<?php echo ($gd['goods_image']); ?>" width="56" height="56"/></span></div></td>
                <td class="w50pre"><?php echo ($gd['goods_name']); ?></td>
                <td class="w96 align-center"><?php echo ($gd['spec_info']); ?></td>
                <td class="w96 align-center"><span class="red_common"><?php echo ($gd['goods_price']); ?></span></td>
                <td class="w96 align-center"><?php echo ($gd['goods_num']); ?></td>
              </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
          </table></td>
      </tr>
      <tr>
      	<th>发货处理</th>
      </tr>
      <tr>
          <td>
  <!-- S 发货处理 -->
         <?php if($vo['order_state'] == 20): ?><form action="<?php echo U('Order/order_op',array('order_id'=>$vo['order_id']));?>" method="post" id="fh_form" name="fh_form"> 
		  	快递公司：
            <select name="shipping_name" id="shipping_name">
            	<?php if(is_array($express)): $i = 0; $__LIST__ = $express;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ep): $mod = ($i % 2 );++$i;?><option value="<?php echo ($ep['e_name']); ?>"><?php echo ($ep['e_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            运单号:<input name="shipping_code" id="shipping_code" value="" type="text" />
            <a href="JavaScript:void(0);" class="btn" onclick="check_fh()"><span>提交</span></a>
          </form>	
          <script language="javascript">
		  function check_fh()
		  {
			  var shipping_code = $("#shipping_code").val();
			  if(shipping_code == '')
			  {
				 alert('请输入运单号');  
			  }else{
				 $("#fh_form").submit(); 	  
		      }
		  }
		  </script><?php endif; ?>
  <!-- E 发货处理 -->

          </td>
      </tr>
    </tbody>
    <tfoot>
      <tr class="tfoot">
        <td><a href="JavaScript:void(0);" class="btn" onclick="history.go(-1)"><span>返回</span></a></td>
      </tr>
    </tfoot>
  </table>
</div>

</body></html>